stafir = "AÁBCDÐEÉFGHIÍJKLMNOÓPQRSTUÚVWXYZÞÆÖ"
f = open("texti.txt", "r")
strengur = f.readline()


fjoldi = []
for x in stafir:
	fjoldi.append(strengur.count(x))

for a in range(15, 0, -1):
	tempStrengur = "AÁBCDÐEÉFGHIÍJKLMNOÓPQRSTUÚVWXYZÞÆÖ"
	for x in range(0, len(stafir)):
		if fjoldi[x] >= a:
			tempStrengur = tempStrengur[:x] + "*" + tempStrengur[x+1:]
		else:
			tempStrengur = tempStrengur[:x] + " " + tempStrengur[x+1:]
	print(tempStrengur)
print(stafir)
